package com.bsoft.exchange.dao.his;


import java.sql.SQLException;
import java.util.Date;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.bsoft.exchange.domain.YyxxForCancel;


@Mapper
public interface AppointmentPayCancelMapper {
//	List<CanceledWorks> selectList(@Param("startTime") Date startTime,
//			@Param("endTime") Date endTime);
//	
	
	/**
	 * 获取预约信息
	 */
	YyxxForCancel getYyxx(@Param("yyxh")int yyxh, @Param("jgid")int jgid);

	Integer getJzlsNum(@Param("ghxh") Long ghxh);
	/**
	 * update预约信息
	 */
	Integer updateYyqxYyxx(@Param("qxsj")Date qxsj,@Param("qxr")String qxr,@Param("qxyy")String qxyy,@Param("yyxh")int yyxh,@Param("jgid")int jgid) throws SQLException;
	/**
	 * update号源信息
	 */
	Integer updateYyqxHyxx(@Param("hyxh")int hyxh,@Param("jgid")int jgid);
	/**
	 * update挂号明细MS_GHMX
	 */
	Integer updateYyqxGhmx(@Param("ghxh")int ghxh,@Param("jgid")int jgid);
	/**
	 * update退号明细MS_THMX
	 */
	Integer updateYyqxThmx(@Param("ghxh")int ghxh,@Param("czgh")String czgh,@Param("mzlb")int mzlb,@Param("thrq")Date thrq,@Param("jgid")int jgid);
	/**
	 * update MS_YYGH
	 */
	Integer updateYyqxYygh(@Param("ghxh")int ghxh,@Param("jgid")int jgid);
	/**
	 * 获取MS_YSPB记录
	 */
	Integer getCountYspb(@Param("ysdm")String ysdm,@Param("ksdm")String ksdm,@Param("kssj")Date kssj,@Param("jssj")Date jssj,@Param("zblb")int zblb,@Param("jgid")int jgid);
	/**
	 * 更新MS_YSPB记录
	 */
	Integer updateYyqxYspb(@Param("ysdm")String ysdm,@Param("ksdm")String ksdm,@Param("kssj")Date kssj,@Param("jssj")Date jssj,@Param("zblb")int zblb,@Param("jgid")int jgid);
	
	/**
	 * update MS_KSPB
	 */
	Integer updateYyqxkspb(@Param("ghrq")int ghrq,@Param("zblb")int zblb,@Param("ksdm")String ksdm,@Param("jgid")int jgid);
	/**
	 * 获取MS_KSPB记录
	 */
	Integer getCountKspb(@Param("ghrq")int ghrq,@Param("zblb")int zblb,@Param("ksdm")String ksdm,@Param("jgid")int jgid);
	
	/**
	 * 获取MS_GHMX记录的mzlb
	 */
	Integer getMzlb(@Param("ghxh")int ghxh,@Param("jgid")int jgid);
	
	/**
	 * 获取MS_GHMX记录的jzzt
	 */
	Integer getJzzt(@Param("ghxh")int ghxh,@Param("jgid")int jgid);
	
}